﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Linq;
using System.ServiceProcess;

namespace IVRJunctionYouTubeUploadService
{
    [RunInstaller(true)]
    public partial class IVRJunctionYouTubeUploadInstaller : System.Configuration.Install.Installer
    {
        public IVRJunctionYouTubeUploadInstaller()
        {
            InitializeComponent();
            var processInstaller = new ServiceProcessInstaller();
            var serviceInstaller = new ServiceInstaller();

            //set the privileges
            processInstaller.Account = ServiceAccount.User;

            serviceInstaller.DisplayName = "IVR Junction- YouTube Upload Service";
            serviceInstaller.StartType = ServiceStartMode.Manual;
            serviceInstaller.Description = " This IVR Junction service uploads the audio files on YouTube account of NGO";

            //must be the same as what was set in Program's constructor
            serviceInstaller.ServiceName = "IVR Junction- YouTube Upload Service";
            serviceInstaller.DelayedAutoStart = true;

            this.Installers.Add(processInstaller);
            this.Installers.Add(serviceInstaller);
        }
    }
}
